﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MySql.Data.MySqlClient;

namespace br.com.nrtech.ccb.bot.bll
{
    public static class Conexao
    {
        public static MySqlConnection mConn;

        public static void conectar() {
            try
            {
                if (mConn != null && mConn.State == System.Data.ConnectionState.Open)
                {
                    mConn.Close();
                    mConn.Open();
                    return;
                }

                mConn = new MySqlConnection(@"Persist Security Info=False;server=dbmy0036.whservidor.com;database=peritoonli_3;uid=peritoonli_3;" +
                        @"server=dbmy0036.whservidor.com;database=peritoonli_3;uid=peritoonli_3;pwd=2013oano");
                mConn.Open();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
